-- GENERATED SPELL FOR [Doctor Weavil] --


function spell0_15552(pUnit, Event) --@Mental Domination,n/a--
pUnit:FullCastSpellOnTarget(25772,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15552', 665, 1)
end

function spell1_15552(pUnit, Event) --@Mind Shatter,n/a--
pUnit:FullCastSpellOnTarget(25774,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15552', 3265, 1)
end

function Sorts_15552(pUnit, Event)
local choix_sorts_15552 = math.random(0, 1)
if choix_sorts_15552 == 0 then
pUnit:RegisterEvent('spell0_15552', 1, 1)
end
if choix_sorts_15552 == 1 then
pUnit:RegisterEvent('spell1_15552', 1, 1)
end
end

function mob15552_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15552', math.random(1500, 3000), 1)
end

function mob15552_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15552_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15552_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15552, 1, 'mob15552_Action')
RegisterUnitEvent(15552, 2, 'mob15552_Leave')
RegisterUnitEvent(15552, 3, 'mob15552_Kill')
RegisterUnitEvent(15552, 4, 'mob15552_Die')
